<template>
  <div>
    <div style="margin-bottom: 10px;">待结算列表</div>
    <el-table
      :data="dataList"
      border
      v-loading="dataListLoading"
      style="width: 100%;"
    >
      <el-table-column prop="saleMonth" header-align="center" align="center" label="月份"></el-table-column>
      <el-table-column prop="balance" header-align="center" align="center" label="金额"></el-table-column>
      <!--<el-table-column prop="author" header-align="center" align="center" label="当月服务系数"></el-table-column>-->
    </el-table>
    <div style="display: flex;justify-content: center;margin: 20px;"><el-button type="primary" @click="goBack">返回</el-button></div>
  </div>
</template>

<script>
  export default {
    name: 'moneyBaseWaitList',
    data () {
      return {
        dataListLoading: false,
        dataList: [],
      }
    },
    props: ['id'],
    mounted () {
      this.init()
    },
    methods: {
      init () {
        this.dataListLoading = true;
        this.$http({
          url: this.$http.adornUrl(`/account/saleAccount/settlementInfo/${this.id}/12`),
          method: "get"
        }).then(({ data }) => {
          this.dataListLoading = false;
          if (data && data.code === 0) {
            this.dataList = data.settlementVos
          } else {
            this.dataList = []
          }
        })
      },
      goBack () {
        this.$emit('goback')
      }
    }
  }
</script>

<style scoped>

</style>
